package cn.atim;
import java.util.Date;
public class  Test{


    public static void main(String[] args){
        long val = 1000000000;
        if(args.length>0){
            val = Long.parseLong(args[0]);
        }
        Date start = new Date();
	long count = runs(val);
        Date end = new Date();
        System.out.println("end i:"+val+" count:"+count+" time:"+(Double.valueOf(end.getTime()-start.getTime())/1000));

    }
    public static long runs(long val){
        long count = 0;
        long i=0;
        for(;i<val;i++){
            count+=i;

        }
	return count;
	    
    }



}
